<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglib.jsp"%>
<!doctype html>
<html class="x-border-box x-strict x-viewport">
<head>
<%@ include file="/common/head-system.jsp"%>
<title>列表</title>
<script type="text/javascript">
	window.refreshQuery = function() {
		document.getElementById("queryForm").submit();
	}
	jQuery(function(){
		openMenu(1, 1);
		jQuery("#main_title").html("代码生成 - 集合")
	});
</script>
<style type="text/css">
</style>
</head>
<body class="x-body x-reset x-border-layout-ct x-container">
	<%@ include file="/common/before-body-system.jsp"%>
	<s:actionerror />
	<s:actionmessage />
	<form action="list.do" method="post" id="queryForm">
		<ext:panel head="查询条件">
			<table>
				<tr>
					<td width="400"><ext:formField labelname="路径"
							fieldname="mappingQuery.nameText">
							<s:textfield name="mappingQuery.nameText"
								cssClass="x-form-field x-form-text" cssStyle="width: 100%;" />
						</ext:formField>
					</td>
					<td width="400"><ext:formField labelname="表前缀"
							fieldname="mappingQuery.prefixText">
							<s:textfield name="mappingQuery.prefixText"
								cssClass="x-form-field x-form-text" cssStyle="width: 100%;" />
						</ext:formField>
					</td>
				</tr>
			</table>
		</ext:panel>
		<div
			style="width: 100%; height: 34px; text-align: right; padding: 3px 0px;">
			<s:url id="u" action="input" />
			<ext:button name="添加" onclick='%{"window.open(\'" + #u +"\')"}' />
			<ext:button name="查询" width="50"
				onclick="jQuery('#mainForm').submit();" />
		</div>
		<ext:panel head="列表">
			<div class="my-grid">
				<table cellpadding="0" border="0" cellspace="0" width="100%">
					<tr>
						<td width="30"><ext:gridHeadCell>
							序号
						</ext:gridHeadCell></td>
						<td><ext:gridHeadCell>
							主键
						</ext:gridHeadCell></td>
						<td><ext:gridHeadCell>
							路径
						</ext:gridHeadCell></td>
						<td><ext:gridHeadCell>
							表前缀
						</ext:gridHeadCell></td>
						<td><ext:gridHeadCell>
							JDBC驱动
						</ext:gridHeadCell></td>
						<td><ext:gridHeadCell>
							JDBC链接
						</ext:gridHeadCell></td>
						<td><ext:gridHeadCell>
							JDBC用户名
						</ext:gridHeadCell></td>
						<td><ext:gridHeadCell>
							JDBC密码
						</ext:gridHeadCell></td>
						<td><ext:gridHeadCell>
							JNDI
						</ext:gridHeadCell></td>
						<td width="90"><ext:gridHeadCell align="center">
							操作
						</ext:gridHeadCell></td>
					</tr>
					<s:iterator value="page.result" id="vo" status="s">
						<s:if test="#s.count%2 == 1">
							<s:set name="rc" value="''" />
						</s:if>
						<s:else>
							<s:set name="rc" value="' x-grid-row-alt'" />
						</s:else>
						<tr class="x-grid-row<s:property value='rc' />">
							<td valign="middle" style="padding-left: 0px;"
								class=" x-grid-cell x-grid-cell-special x-grid-cell-first"><div
									style="text-align: right; font-weight: bolder;"
									class="x-grid-cell-inner">
									<s:property value="#s.count" />
								</div>
							</td>
							<td valign="middle" class=" x-grid-cell"><div style="text-align: left;"
									class="x-grid-cell-inner">
									<s:property value="#vo.id" />
								</div></td>
							<td valign="middle" class=" x-grid-cell"><div style="text-align: left;"
									class="x-grid-cell-inner">
									<s:property value="#vo.nameText" />
								</div></td>
							<td valign="middle" class=" x-grid-cell"><div style="text-align: left;"
									class="x-grid-cell-inner">
									<s:property value="#vo.prefixText" />
								</div></td>
							<td valign="middle" class=" x-grid-cell"><div style="text-align: left;"
									class="x-grid-cell-inner">
									<s:property value="#vo.jdbcDriver" />
								</div></td>
							<td valign="middle" class=" x-grid-cell"><div style="text-align: left;"
									class="x-grid-cell-inner">
									<s:property value="#vo.jdbcUrl" />
								</div></td>
							<td valign="middle" class=" x-grid-cell"><div style="text-align: left;"
									class="x-grid-cell-inner">
									<s:property value="#vo.jdbcUsername" />
								</div></td>
							<td valign="middle" class=" x-grid-cell"><div style="text-align: left;"
									class="x-grid-cell-inner">
									<s:property value="#vo.jdbcPassword" />
								</div></td>
							<td valign="middle" class=" x-grid-cell"><div style="text-align: left;"
									class="x-grid-cell-inner">
									<s:property value="#vo.jndiText" />
								</div></td>
							<td valign="middle" class=" x-grid-cell x-grid-cell-last"><div
									style="text-align: left;" class="x-grid-cell-inner">
									<s:url id="u" action="input">
										<s:param name="id">
											<s:property value="#vo.id" />
										</s:param>
									</s:url>
									<ext:button name="修改" onclick='%{"window.open(\'" + #u +"\')"}' />
									<s:url id="u" action="input!delete">
										<s:param name="mapping.nameText">
											<s:property value="#vo.nameText" />
										</s:param>
									</s:url>
									<ext:button name="删除"
									onclick='%{"jQuery.hiddenRequest(\'" + #u +"\')"}' />
								</div></td>
						</tr>
					</s:iterator>
				</table>
			</div>
			<ext:page page="page" />
		</ext:panel>
	</form>
	<%@ include file="/common/after-body-system.jsp"%>
</body>
</html>